async function returnsPromise1() {
  return 'value';
}
void returnsPromise();

async function returnsPromise2() {
  return 'value';
}
void /* ... */ returnsPromise();

async function returnsPromise3() {
  return 'value';
}
1, returnsPromise();

async function returnsPromise4() {
  return 'value';
}
bool ? returnsPromise() : null;

async function foo4() {
  const myPromise = async () => void 0;
  const condition = true;

  (await condition) && myPromise();
}

async function foo5() {
  const myPromise = Promise.resolve(true);
  let condition = true;
  condition && myPromise;
}

async function foo6() {
  const myPromise = Promise.resolve(true);
  let condition = false;
  condition || myPromise;
}

async function foo7() {
  const myPromise = Promise.resolve(true);
  let condition = null;
  condition ?? myPromise;
}

declare const maybeCallable: string | (() => void);
Promise.resolve().then(() => {}, maybeCallable);

declare const maybeCallable: string | (() => void);
declare const definitelyCallable: () => void;
Promise.resolve().then(() => {}, undefined);
Promise.resolve().then(() => {}, null);
Promise.resolve().then(() => {}, 3);
Promise.resolve().then(() => {}, maybeCallable);
Promise.resolve().then(() => {}, definitelyCallable);

Promise.resolve().catch(undefined);
Promise.resolve().catch(null);
Promise.resolve().catch(3);
Promise.resolve().catch(maybeCallable);
Promise.resolve().catch(definitelyCallable);

Promise.reject() || 3;

Promise.reject()
  .finally(() => {})
  .finally(() => {});
